home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_300 / 352_01 / strppfix.cpp < prev    next >
C/C++ Source or Header  |  1991-04-22  |  380b  |  16 lines

  1. // STRPPFIX.CPP - contains String::String(int) = fixed length constructor
  2. //
  3. #include <stdlib.h>
  4. #include <string.h>
  5. #include "wtwg.h"
  6. #include "dblib.h"
  7.  
  8. String::String (int nb)
  9.     {
  10.     char *ptr = (char *)wmalloc ( nb+1, "String" );
  11.     memset ( ptr, ' ', nb );
  12.     ptr[nb] = 0;
  13.     s = ptr;
  14.     n = nb;
  15.     }
  16. //--------------- end of String::String(int) ---------------------------